package qmzy2;

import java.sql.SQLOutput;

public class qmzy2 {
    private int age;

    public void setAge(int age) {
        if (age < 1 || age > 100) {
            System.out.println("年龄不合法");

        }else {
            this.age = age;
        }
    }
}

